package com.example.jasonrpc.proto;

import java.util.Arrays;

/**
 * 表示rpc的请求
 */
public class Request {
    private ServiceDescriptor service;
    private Object[] parameters;

    public Request() {
    }

    public Request(ServiceDescriptor service, Object[] parameters) {
        this.service = service;
        this.parameters = parameters;
    }

    @Override
    public String toString() {
        return "Request{" +
                "service=" + service +
                ", parameters=" + Arrays.toString(parameters) +
                '}';
    }

    public ServiceDescriptor getService() {
        return service;
    }

    public void setService(ServiceDescriptor service) {
        this.service = service;
    }

    public Object[] getParameters() {
        return parameters;
    }

    public void setParameters(Object[] parameters) {
        this.parameters = parameters;
    }
}
